<div class="widget redblack">
    <div class="widget-title">
        <h4><i class="icon-calendar"></i> Calendario</h4>
        <span class="tools">
            <a href="javascript:;" class="icon-chevron-down"></a>
            <a href="javascript:;" class="icon-remove"></a>
        </span>
    </div>
    <?php
    ?>
    <div class="widget-body">
        <?php
        $this->widget('application.extensions.fullcalendar.FullcalendarGraphWidget', array(
            'id' => 'calendar',
            'options' => array(
                'editable' => false,
                'monthNames' => Util::obtenerMeses(),
                'monthNamesShort' => Util::obtenerMesesCortos(),
                'dayNames' => Util::obtenerDias(),
                'buttonText' => Util::obtenerBotonesCalendario(),
                'dayNamesShort' => Util::obtenerDiasCortos(),
                'columnFormat' => Util::obtenerColumnasCalendario(),
                'titleFormat' => Util::obtenerTitulosCalendario(),
                'eventSources' => array(CController::createUrl('/eventos/calendario/ajaxCargaCalendarioCuenta', array('cuenta_id' => $model->id))),
                'eventClick' => 'js:function(event, eventElement, view){
                        AjaxModalEntidad(event,"view");
                }',
            ),
            'htmlOptions' => array(
                'class' => 'has-toolbar'
            ),
        ));
        ?>
        <br>
        <?php
        Util::checkAccess(array("action_evento_createModal"))?
        $this->widget('bootstrap.widgets.TbButton', array(
            'id' => 'add-Calendario',
            'label' => 'Agregar Evento',
            'encodeLabel' => false,
            'icon' => 'plus-sign',
            'htmlOptions' => array(
                'onClick'=>'js:viewModal("eventos/evento/create/entidad_tipo/'.$model->tableName().'/entidad_id/'.$model->id.'",function(){'
                    . 'maskAttributes();})',
                
            ),
        )):'';
        ?>
    </div>
</div>